<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', 'IndexController@index');
Route::get('/index', 'IndexController@index');

Route::prefix('user')->group(function () {
    // 分类列表
    Route::get('index', 'UserController@index');
    // 添加分类
    Route::get('create', 'UserController@create');
    Route::post('store', 'UserController@store');
    // 编辑分类
    Route::get('edit/{id}', 'UserController@edit');
    Route::post('update/{id}', 'UserController@update');
    // 删除分类
    Route::get('destroy/{id}', 'UserController@destroy');
});
